package org.hs.phd.odi.tracking.tool.bgsub.fgdetection;

import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.FlowLayout;

import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;

import org.hs.phd.common.simpleplayer.FramViewerController;
import org.hs.phd.common.simpleplayer.FramePlayer;


public class FGObjectDetectionFrame extends JFrame{
	
	private Component frameViewer;
	private final FramePlayer player;
	private FramViewerController viewerController;
	
	public FGObjectDetectionFrame(FramePlayer player){
		super("Foreground Object Detection");
		this.player = player;
		this.frameViewer = player.getViewerComponent();
		this.viewerController = player.getViewerController();
		
		contructGUI();
	}

	private void contructGUI() {
		JPanel pnlButtons = new JPanel( new FlowLayout(FlowLayout.LEFT) );
		pnlButtons.setBorder( BorderFactory.createEtchedBorder());
		pnlButtons.add(new JButton("Clear Tracks"));

		viewerController.setScale(0.75f);
		//frameViewer.setScale(1);
		
		JPanel pnlViewer = new JPanel(new BorderLayout());
		pnlViewer.setBorder( BorderFactory.createEtchedBorder());
		pnlViewer.add(frameViewer, BorderLayout.CENTER);
		
		getContentPane().add(pnlButtons, BorderLayout.NORTH);
		getContentPane().add(pnlViewer, BorderLayout.CENTER);
		
		
	}


}
